package com.jhws.business.card.bo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @author Alex Tan
 * <p>
 * IC卡权限表实体类
 * 每条数据代表一条IC卡权限,也就是能开的某一个门
 */
@Table(name = "card_perms")
@Entity
public class TblCardPerms {
    /**
     * 主键ID
     */
    @Id
    private String id;
    /**
     * 卡片编号
     */
    private String cardNo;
    /**
     * 该权限所在楼栋信息的文字描述，为了方便显示用
     */
    private String devStr;
    /**
     * 该权限所对应门禁设备中刷卡模块的楼栋标识
     * 这个数据会被写入到门禁设备中
     */
    private String devNo;
    /**
     * 该权限所对应门禁设备的编号信息
     */
    private String devBuildingNo;
    /**
     * 该条权限被更新的时间戳，用于黑白名单使用
     */
    private Long timeStamp;

    @Column(name = "is_synch", columnDefinition = "INT default 0")
    private int isSynch; //是否同步

    public Long getTimeStamp() {
        return timeStamp;
    }

    public void setTimeStamp(Long timeStamp) {
        this.timeStamp = timeStamp;
    }

    public String getDevBuildingNo() {
        return devBuildingNo;
    }

    public void setDevBuildingNo(String devBuildingNo) {
        this.devBuildingNo = devBuildingNo;
    }

    private String enable;

    public String getEnable() {
        return enable;
    }

    public void setEnable(String enable) {
        this.enable = enable;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    public String getDevStr() {
        return devStr;
    }

    public void setDevStr(String devStr) {
        this.devStr = devStr;
    }

    public String getDevNo() {
        return devNo;
    }

    public void setDevNo(String devNo) {
        this.devNo = devNo;
    }

    public int getIsSynch() {
        return isSynch;
    }

    public void setIsSynch(int isSynch) {
        this.isSynch = isSynch;
    }

    @Override
    public String toString() {
        return "TblCardPerms{" +
                "id='" + id + '\'' +
                ", cardNo='" + cardNo + '\'' +
                ", devStr='" + devStr + '\'' +
                ", devNo='" + devNo + '\'' +
                ", devBuildingNo='" + devBuildingNo + '\'' +
                ", timeStamp=" + timeStamp +
                ", isSynch=" + isSynch +
                ", enable='" + enable + '\'' +
                '}';
    }
}
